package org.dna.metronomo.persistence.impl;

import java.sql.SQLException;

import org.apache.ibatis.session.SqlSession;
import org.dna.metronomo.persistence.IJobDAO;
import org.dna.metronomo.persistence.Job;
import org.dna.metronomo.persistence.PersistenceException;

public class IBatisJobDAO extends IBatisMetronomoDAO implements IJobDAO {

	public Job queryByID(final int id) throws PersistenceException {
		return executeInSession(new SessionExecutor<Job>() {

			public Job execute(SqlSession session) throws SQLException {
				return (Job) session.selectOne("JobMapper.queryByID", id);
			}
		});
	}

}
